<template>
	<view>
		<view class="topic-item-container" @click="clickTopicItem(topic.id)">
			<view class="topic-image">
				<image :src="topic.coverImg" mode="widthFix"></image>
			</view>
			<view class="topic-content">
				<view class="topic-tiele"># {{topic.topicTitle}} #</view>
				<view class="topic-abstract">{{topic.topicSubtitle}}</view>
				<view class="topic-data-info">
					<view class="topic-total">动态{{topic.topicDynamicNum}}条</view>
					<view class="topic-taday">今日{{topic.topicDynamicNum}}条</view>
				</view>
			</view>
		</view>
		<view class="block-line"></view>
	</view>
</template>

<script>
	export default {
		name:"funTopicItem",
		data() {
			return {
				
			};
		},
		props:{
			topic:{
				type:Object,
				default:function(){
					return {}
				}
			}
		},
		methods:{
			clickTopicItem(){
				this.$emit("clickTopicItem", 1)
			}
		}
	}
</script>

<style lang="scss">
	.block-line{
		background-color: #EEEEEE;
		height: 4rpx;
		margin: 20rpx 10rpx;
	}
	.topic-item-container{
		display: flex;
		align-items: center;
		.topic-image{
			width: 160rpx;
			height: 100rpx;
			border-radius: 10rpx;
			overflow: hidden;
			image{
				max-width: 100%;
			}
		}
		.topic-content{
			margin: 0 20rpx;
			.topic-tiele{
				font-size: 28rpx;
				color: #333333;
			}
			.topic-abstract{
				font-size: 24rpx;
			}
			.topic-data-info{
				font-size: 22rpx;
				display: flex;
				align-items: center;
				.topic-taday{
					margin: 0 20rpx;
				}
			}
		}
	}
</style>
